import store from '../../store'
import { WaitForPushCardEvent } from '@/store/reactiveStore'

async function waitForClickButton(): Promise<WaitForPushCardEvent> {
    return new Promise<WaitForPushCardEvent>(resolve => {
        store.dispatch('reactiveStore/setWaitForButton', (args: WaitForPushCardEvent) => {
            resolve(args)
            store.dispatch('reactiveStore/setWaitForButton', ()=>{})
        })
    })
}


export default {
    waitForClickButton
}
